package com.mc.cloud.mall.cartOrder.feign;

import com.mc.cloud.mall.categoryProduct.model.pojo.Product;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @ClassName ProductFeignClient
 * @Author MC
 * @Date 2021/5/24 0:35
 * @Version 1.0
 **/

@FeignClient(value = "cloud-categoryProduct-service")
public interface ProductFeignClient {
    
    @GetMapping("/product/detailForFeign")
    @ResponseBody
    public Product productDetailForFeign(@RequestParam Integer id);
    
    @PostMapping("/product/updateProductForFeign")
    @ResponseBody
    public void updateProductForFeign(@RequestParam Integer productId,@RequestParam Integer stock);
}
